package Util;/*
                   _ooOoo_
                  o8888888o
                  88" . "88
                  (| -_- |)
                  O\  =  /O
               ____/`---'\____
             .'  \\|     |//  `.
            /  \\|||  :  |||//  \
           /  _||||| -:- |||||-  \
           |   | \\\  -  /// |   |
           | \_|  ''\---/''  |   |
           \  .-\__  `-`  ___/-. /
         ___`. .'  /--.--\  `. . __
      ."" '<  `.___\_<|>_/___.'  >'"".
     | | :  `- \`.;`\ _ /`;.`/ - ` : | |
     \  \ `-.   \_ __\ /__ _/   .-` /  /
======`-.____`-.___\_____/___.-`____.-'======
                   `=---='
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
            佛祖保佑       永无BUG
*/

import Bean.res;
import com.alibaba.fastjson.JSONObject;

public class RES {
    private static int successcode=200;
    private static String success="success";
    private static String fail="fail";
    private static int failcode=400;
    public static <T> String success(T data){
        return JSONObject.toJSONString(new res(successcode,success,data));
    }
    public static <T> String fail(T data){
        return JSONObject.toJSONString(new res(failcode,fail,data));
    }
}
